package hello;

import engine.Engine;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;

public class HelloMIDLet extends MIDlet {

    private Display display;     // The display

    private Canvas canvas;   // Canvas 


    public HelloMIDLet() {
        display = Display.getDisplay(this);
        //canvas = new TestCanvas();
        canvas = Engine.getInstance();
    }

    protected void startApp() {
        System.gc();
        display.setCurrent(canvas);
    }

    protected void pauseApp() {
        
    }

    protected void destroyApp(boolean unconditional) {
    }

    public void exitMIDlet() {
        destroyApp(true);
        notifyDestroyed();
    }
}

